# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PythonPackageSpec do
  @moduledoc """
  The spec of a Python packaged code.

  ## Attributes

  *   `args` (*type:* `list(String.t)`, *default:* `nil`) - Command line arguments to be passed to the Python task.
  *   `env` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EnvVar.t)`, *default:* `nil`) - Environment variables to be passed to the python module. Maximum limit is 100.
  *   `executorImageUri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of a container image in Artifact Registry that will run the provided Python package. Vertex AI provides a wide range of executor images with pre-installed packages to meet users' various use cases. See the list of [pre-built containers for training](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). You must use an image from this list.
  *   `packageUris` (*type:* `list(String.t)`, *default:* `nil`) - Required. The Google Cloud Storage location of the Python package files which are the training program and its dependent packages. The maximum number of package URIs is 100.
  *   `pythonModule` (*type:* `String.t`, *default:* `nil`) - Required. The Python module name to run after installing the packages.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :args => list(String.t()) | nil,
          :env => list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EnvVar.t()) | nil,
          :executorImageUri => String.t() | nil,
          :packageUris => list(String.t()) | nil,
          :pythonModule => String.t() | nil
        }

  field(:args, type: :list)
  field(:env, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EnvVar, type: :list)
  field(:executorImageUri)
  field(:packageUris, type: :list)
  field(:pythonModule)
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PythonPackageSpec do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PythonPackageSpec.decode(value, options)
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PythonPackageSpec do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
